home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d18 / opint102.5rc / OPINT.DOC < prev    next >
Text File  |  1988-12-04  |  55KB  |  2,001 lines

  1.     Opus System file interface  Version 1.02                     Nov 23, 1988
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.                                     O P I N T
  22.  
  23.                                        By
  24.  
  25.                                     Per Holm.
  26.  
  27.                           The Opus Sytem File Interface.
  28.  
  29.                                        And
  30.  
  31.                                  Fossil Interface
  32.  
  33.  
  34.                              A Turbo Pascal 4.0 unit.
  35.  
  36.                                        Or
  37.  
  38.                              A Turbo Pascal 5.0 unit.
  39.  
  40.     Opus System file interface  Version 1.02                     Nov 23, 1988
  41.  
  42.  
  43.       WHAT IS OPINT ?
  44.  
  45.         OpInt is an interface to read and write most of the OPUS system files.
  46.  
  47.  
  48.  
  49.             OpInt v1.02 - OPus system file INTerface.
  50.  
  51.             COPYRIGHT (C) 1988 Bifrost Unlimited, all rights reserved.
  52.  
  53.  
  54.             OpInt V 1.02 is not public domain.
  55.             But you are granted a limited license to use OpInt under the
  56.           following conditions.
  57.  
  58.             -  OpInt may not be used in commercial environments without
  59.                written permission from Bifrost Unlimited & Per Holm.
  60.  
  61.             -  You may use the OpInt interface as long as Credits are given
  62.                to the Author of OpInt and WW3.
  63.  
  64.             -  If you write a Postcard to the author. (it will only cost
  65.                you a single postcard and a stamp).
  66.  
  67.             -  OpInt may not be modified in any way.
  68.  
  69.             -  You may give a copy and distribute OpInt as long as no fee
  70.                are charged (this includes compensation for diskettes).
  71.  
  72.             -  OpInt V1.02 must be copied in unmodified form, complete with
  73.                the following files in the archive OpInt102.?RC:
  74.  
  75.                   OpInt.TPU   : The TPAS 4.0 or 5.0 Unit
  76.                   OpInt.TXT   : Short Description about the use of OpInt.
  77.                   OpInt.DOC   : This lousy documentation.
  78.                   Demo.PAS    : A sample demo Program.
  79.                   D_Com1.PAS  : A sample demo for the communication Section.
  80.                   D_Com2.PAS  : A sample demo for the communication section.
  81.                   D_Msg.PAS   : A sample demo for the message section.
  82.                   D_Nodel.PAS : A sample demo for the nodelist section.
  83.                   D_User.PAS  : A sample demo for the user section.
  84.                   Read.Me     : Short info from the author.
  85.  
  86.                where Opint102.ARC will be the Turbo Pascal 4.00 version
  87.                and Opint102.5RC will be the Turbo Pascal 5.00 version..
  88.  
  89.         The OpInt Unit was written to make it a little easier to write Turbo
  90.       Pascal utilities for the OPUS <tm> CBCS system.
  91.  
  92.         Per Holm and Bifrost Unlimited gives you no garanties for the use of
  93.       this package, and the programs using it.
  94.  
  95.         Please report any bugs and sugestions for new routines to the authors
  96.       and feel free to send code with your favorite routines.
  97.  
  98.         As soon as we get hold on the file structures for OPUS Ver. 1.10 the
  99.       interface will be rewritten for these new file structures.
  100.  
  101.     Opus System file interface  Version 1.02                     Nov 23, 1988
  102.  
  103.  
  104.         And Now some Credits.
  105.  
  106.           Thanx to
  107.             Wynn Wagner III and the OPUS crew for the OPUS package.
  108.             Vince Perriello & Bob Hartman for Binkley.
  109.             Bob Hartman for Confmail and a lot more.
  110.             Kristian Ottosen (2:505/20 Closed) for Hints, Help and Support.
  111.             Jesper Wolf (2:230/10.1) for more Hints.
  112.             All those writing BBS software/shareware and utils for dooing it.
  113.  
  114.            Please use the inteface in a frienly matter.
  115.  
  116.          The Beta Tester Crew was:
  117.  
  118.             Peter Kjoege (2:34/7)
  119.             Mik Tuver (2:230/22.24)
  120.             Lars Halling (2:230/30.5)
  121.             Soren Ager (2:231/12)
  122.             Morten Nielsen (2:231/33)
  123.             Johnny Odgaard (2:231/34)
  124.             Jesper Larsen (2:231/47)
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.         Regards
  146.            Per Holm
  147.  
  148.              Internet: perholm@daimi.DK
  149.              FidoNet: Per Holm - 2:230/22   (+45 6 119 043)  (#CM: 24 Hrs)
  150.              MAIL: Per Holm
  151.                    Risdalsvej 44,v1.
  152.                    DK-8260 Viby J.
  153.                    Denmark.
  154.  
  155.  
  156.     Opus System file interface  Version 1.02                     Nov 23, 1988
  157.  
  158.  
  159.        The OpInt unit includes procedures an functions meant to make it easier to
  160.      write utility programs for OPUS <tm> Version 1.03.
  161.  
  162.        The package includes procedures and functions to read and write the
  163.      following files :
  164.  
  165.          OPUS.PRM     : The compiled control file for OPUS <tm> v 1.03.
  166.          USER.BBS     : The file containing all users on your board.
  167.          LASTUSER.BBS : File created when using external program from OPUS.
  168.          SYSTEM??.BBS : The area description files.
  169.          SCHED.BBS    : The schedule file.
  170.          NODELIST.IDX : The nodelist index file.
  171.          NODELIST.SYS : The nodelist file for the version 5 nodelist.
  172.          NODELIST.DAT : The nodelist file for the version 6 nodelist.
  173.          *.MSG        : Messages..
  174.  
  175.       The structures contained in this unit are:
  176.  
  177.         _Sys          : The contents of the SYSTEM??.BBS files.
  178.         _Usr          : Structure to handle a user record.
  179.         _MsgArea      : Structure used in _Usr.
  180.         _MsgHead      : Structure to handle message headers.
  181.         _Msg          : Structure to handle messages.
  182.         _Node         : Pascal structure to handle ver. 5 nodelist records.
  183.         _NewNode      : Pascal structure to handle ver. 6 nodelist records.
  184.         _Ndi          : Pascal structure to handle nodelist index records.
  185.         _Prm          : Structure to handle a version 14 opus parameter file.
  186.         _ClassRec     : User Class structure.
  187.         _Sched        : One entry in the schedule file.
  188.         _Scheds       : All entries in a schedule file.
  189.  
  190.             The structures will not be discussed in this document. For further
  191.             information you must read the file 'OPINT.TXT'.
  192.  
  193.       The special variables in the OpInt unit are:
  194.  
  195.         _Snoop        : Enable/Disable the Snooping.
  196.         _Keyboard     : Enable/Disable keyboard on Fossil.
  197.         _ExitCarrier  : Errorlevel to exit program on carrier change.
  198.         _EightBit     : Enable/Disable eight bit mode on input.
  199.         _ForceCom     : Write to modem even if no carrier.
  200.  
  201.             These variables will not be discussed in this document. For further
  202.             information you must read the file 'OPINT.TXT'.
  203.     Opus System file interface  Version 1.02                     Nov 23, 1988
  204.  
  205.       The routines contained in the unit are:
  206.  
  207.            MISC routines:
  208.  
  209.         OpIntERROR       : Return error codes from the OPINT interface.
  210.         UpperCase        : Convert string to Uppercase.
  211.         Lowercase        : Convert string to Lowercase.
  212.         SmartCase        : Convert first letter in word to Uppercase.
  213.         Delay            : A delay routine.
  214.         GetEnvStr        : Return the settings of an environment variable.
  215.         GMT_Difference   : Return the difference from GMT to local Time Zone.
  216.         DaysThisYear     : Return the current daynumber this year.
  217.         GetDateTime      : Return current time in DateTime Structure.
  218.         PackUnixDate     : Pack Date and time to number of secs since 1-1-1970.
  219.         UnpackUnixDate   : Decode the unix date.
  220.         PackDateStr      : Pack time and date to a string.
  221.         UnpackDateStr    : Decode a date string to DT variable.
  222.         PackDateStrLog   : Convert DateTime to a log compatible date string.
  223.         AddLog           : Add line to a Log File in OPUS format.
  224.         SetAttrib        : Set/reset attribute flags...
  225.  
  226.            The Prm file:
  227.  
  228.         ReadPrm          : Read a OPUS.PRM file.
  229.         WritePrm         : Write a OPUS.PRM file.
  230.  
  231.            The User file & Lastuser.BBS:
  232.  
  233.         ReadUser         : Read a user record from USER.BBS of LASTUSER.BBS.
  234.         WriteUser        : Write a user record.
  235.         NumberOfUsers    : Get the number of user-records in a userfile.
  236.         InitUserPtr      : Make a buffer in memory for handling the User file.
  237.         ReadUserFast     : Read a user record from the memory buffer.
  238.         WriteUserFast    : Write a user record to the memory buffer.
  239.         ReleaseUserPtr   : Delete memory buffer.
  240.         DelUserPtr       : Delete a user record from the memory buffer.
  241.         InsUserPtr       : Insert a user record into the memory buffer.
  242.         ReadUserFile     : Read a Userfile from Disk to a memory buffer.
  243.         WriteUserFile    : Write a memory buffer to a Diskfile.
  244.  
  245.            The System??,BBS & Schedule files:
  246.  
  247.         ReadSys          : Read a SYSTEM??.BBS file.
  248.         WriteSys         : Write a SYSTEM??.BBS file.
  249.         ReadScheds       : Read a schedule file.
  250.         WriteScheds      : Write a schedule file.
  251.  
  252.            The Nodelist files:
  253.  
  254.         ReadNdi          : Read a nodelist index record.
  255.         WriteNdi         : Write a nodelist index record.
  256.         ReadNode         : Read a Nodelist record for ver. 5 nodelist
  257.         WriteNode        : Write a Nodelist type 5 record.
  258.         ReadNewNode      : Read a Nodelist type 6 record.
  259.         WriteNewNode     : Write a Nodelist type 6 record.
  260.         NumberOfNodes    : Return the number of nodes in a nodelist file.
  261.         FindNode         : Find node entry number in a nodelist.
  262.  
  263.     Opus System file interface  Version 1.02                     Nov 23, 1988
  264.  
  265.             Messages:
  266.  
  267.         MsgLength        : Return the length in characters of message in memory.
  268.         FirstFreeMsg     : Return name of the first free message in path.
  269.         ReadMsg          : Read a message to memory.
  270.         WriteMsg         : Write a message from memory to disk.
  271.         ReadMsgHead      : Read Header part of message.
  272.         WriteMsgHead     : Overwrite message head part of message on disk.
  273.         ReadMsgHeadNew   : Read Header part of message.
  274.         WriteMsgHeadNew  : Overwrite message head part of message on disk.
  275.  
  276.       The communication routines contained in the unit are:
  277.  
  278.         KeyPressed       : Check for key Pressed at Stdin.
  279.         ReadKey          : Read a charecter from StdIn (if any).
  280.         GotoXY           : Move stdout cursor to a new position (ANSI).
  281.         PurgeInFossil    : Clear the inputbuffer for a port used.
  282.         PurgeOutFossil   : Clear the outputbuffer for the port used.
  283.         FossilCarrier    : True if there is carrier on the port used.
  284.         FossilPressed    : True if a user pressed a key.
  285.         GotoXYFossil     : Change the users cursor position (ANSI).
  286.         ReadFossil       : Read a character from the selected file.
  287.         AssignFossil     : Assign a com. port to a textfile device driver.
  288.         SetSnoopFossil   : Enable/disable snoop for a device.
  289.         SetKeyboardFossil: Enable/disable keyboard mode for a device.
  290.         SetExitFossil    : Set exit code if carrier changes on device.
  291.         UseInOut         : Redirect stdin & stdout to Text file device.
  292.         UnUseInOut       : Restore stdin & stdout.
  293.  
  294.     Opus System file interface  Version 1.02                     Nov 23, 1988
  295.  
  296.  
  297.     OpIntError Function
  298.  
  299.     DESCRIPTION
  300.  
  301.         This function will return a integer value that is the status of the
  302.       last opInt operation performed.
  303.         A call to OpIntError clears the internal error flag. Some of the other
  304.       functions and procedures in this package may reset the error flag too.
  305.  
  306.         Depending which function or procedure you called last you may get one
  307.       of these error returns from the OpInt unit.
  308.  
  309.             0 = Everything is Bright and Sunny, Just go on
  310.             2 = File not found, Check your filename
  311.             3 = Path not found, Check your pathname
  312.             4 = Too many open files, We need one extra file.
  313.             5 = Fileaccess denied, Check file status.
  314.             12 = Invalid file acces code.
  315.             100 = Disk read error.
  316.             101 = Disk write error.
  317.             190 = Fossil is not loaded.
  318.             191 = Unable to find carrier.
  319.             192 = Carrier on current port has cahanged.
  320.             193 = Timeout reading port.
  321.             194 = Timeout writing port.
  322.             200 = .PRM file is to big ( > 8 KB )
  323.             201 = Wrong CTL file version, You need another OPUS_CTL
  324.             202 = To much data for the .PRM file ( > 8 KB )
  325.             210 = .MSG file is to big ( > 8 KB )
  326.             211 = To many lines in message
  327.             212 = To many charecters to write message
  328.             220 = Cannot find User record
  329.             221 = To Many Records In UserFile
  330.             222 = Not Room For Extra User Record in The Structure
  331.             230 = Cannot find Nodelist Record
  332.             231 = Cannot find Nodelist Index Record
  333.             250 = Illegal Date / Time specified.
  334.  
  335.     SYNTAX
  336.  
  337.         Function OpIntERROR: Integer;
  338.  
  339.     Opus System file interface  Version 1.02                     Nov 23, 1988
  340.  
  341.  
  342.     UpperCase Function
  343.  
  344.     DESCRIPTION
  345.  
  346.         This function will convert a string to Uppercase.
  347.  
  348.     SYNTAX
  349.  
  350.       Function UpperCase(S:String):String;
  351.  
  352.     EXAMPLES
  353.  
  354.       Writeln(UpperCase('Per Holm @ 230/22 - Asgaard_BBS'));
  355.  
  356.     Opus System file interface  Version 1.02                     Nov 23, 1988
  357.  
  358.  
  359.     LowerCase Function
  360.  
  361.     DESCRIPTION
  362.  
  363.         This function will convert a string to Lovercase.
  364.  
  365.     SYNTAX
  366.  
  367.       Function LoverCase(S:String):String;
  368.  
  369.     EXAMPLES
  370.  
  371.       Writeln(LoverCase('Per Holm @ 230/22 - Asgaard_BBS'));
  372.  
  373.     Opus System file interface  Version 1.02                     Nov 23, 1988
  374.  
  375.  
  376.     SmartCase Function
  377.  
  378.     DESCRIPTION
  379.  
  380.         This function will convert a string so all words will start with an
  381.       uppercase charecter.
  382.  
  383.     SYNTAX
  384.  
  385.       Function SmartCase(S:String):String;
  386.  
  387.     EXAMPLES
  388.  
  389.       Writeln(SmartCase('Per Holm @ 230/22 - Asgaard_BBS'));
  390.  
  391.     Opus System file interface  Version 1.02                     Nov 23, 1988
  392.  
  393.  
  394.     Delay Procedure
  395.  
  396.     DESCRIPTION
  397.  
  398.         This procedure will make a delay of ms milliseconds.
  399.         Like the one in the CRT Unit.
  400.  
  401.     SYNTAX
  402.  
  403.       Procedure Delay(MS: Word);
  404.  
  405.     EXAMPLES
  406.  
  407.       Delay(1000);
  408.  
  409.     Opus System file interface  Version 1.02                     Nov 23, 1988
  410.  
  411.  
  412.     GetEnvStr Function
  413.  
  414.     DESCRIPTION
  415.  
  416.         This function will return an environment string, if it exist,
  417.       otherwise it will return an empty string. The name of the environt
  418.       variable is case sensitive which means 'TZ' and 'tz' are two different
  419.       variables.
  420.  
  421.     SYNTAX
  422.  
  423.       Function GetEnvStr(S:String):String;
  424.  
  425.     EXAMPLES
  426.  
  427.       Writeln(GetEnvStr('PATH'));
  428.  
  429.     Opus System file interface  Version 1.02                     Nov 23, 1988
  430.  
  431.  
  432.     GMT_Difference Function
  433.  
  434.     DESCRIPTION
  435.  
  436.         This function will return an integer value with the TZ environment
  437.       variable.
  438.  
  439.     SYNTAX
  440.  
  441.       Function GMT_Difference:Integer;
  442.  
  443.     EXAMPLE
  444.  
  445.       Write('8.00 local time is equal to ',(8+GMT_Difference),'.00);
  446.  
  447.     Opus System file interface  Version 1.02                     Nov 23, 1988
  448.  
  449.  
  450.     DaysThisYear Function
  451.  
  452.     DESCRIPTION
  453.  
  454.         Give day number for the date specified in DT.
  455.         Note that Year >= 1980.
  456.  
  457.     SYNTAX
  458.  
  459.       FUNCTION DaysThisYear(DT: DateTime):Integer;
  460.  
  461.     ERROR RETURNS
  462.  
  463.             250 = Illegal Date / Time specified.
  464.  
  465.     EXAMPLES
  466.  
  467.       ...
  468.       WriteLn('Day Number: ',DaysThisYear(DT));
  469.  
  470.     Opus System file interface  Version 1.02                     Nov 23, 1988
  471.  
  472.  
  473.     GetDateTime Procedure
  474.  
  475.     DESCRIPTION
  476.  
  477.         Get the system date and time to a variable of the type DateTime.
  478.         The Structure DateTime is defined in the Dos unit.
  479.  
  480.     SYNTAX
  481.  
  482.       Procedure GetDateTime(VAR DT:DateTime);
  483.  
  484.     EXAMPLES
  485.  
  486.       Uses Dos,Opint;
  487.       Var DT: DateTime;
  488.  
  489.       Begin
  490.         GetDateTime(DT);
  491.       ....
  492.  
  493.     Opus System file interface  Version 1.02                     Nov 23, 1988
  494.  
  495.  
  496.     PackUnixDate Function
  497.  
  498.     DESCRIPTION
  499.  
  500.         Convert time and date to number of secconds since 1/1-1970 00:00:00.
  501.         Nice tool when calculating dates.
  502.         Note Year must be in the range 1980 - 2080.
  503.  
  504.     SYNTAX
  505.  
  506.       Function PackUnixDate(DT:DateTime):LongInt;
  507.  
  508.     EXAMPLES
  509.  
  510.       Write('Number of secs, since 1970',PackUnixDate(DT));
  511.  
  512.     Opus System file interface  Version 1.02                     Nov 23, 1988
  513.  
  514.  
  515.     UnpackUnixDate Procedure
  516.  
  517.     DESCRIPTION
  518.  
  519.         Convert number of seconds since 1/1-1970 to DatTime format.
  520.  
  521.     SYNTAX
  522.  
  523.       Procedure UnpackUnixDate(Date:LongInt; Var DT:DateTime);
  524.  
  525.     Opus System file interface  Version 1.02                     Nov 23, 1988
  526.  
  527.  
  528.     PackDateString Function
  529.  
  530.     DESCRIPTION
  531.  
  532.         Convert DateTime variable to a string of the format '24-May-88 12:22:21'
  533.  
  534.     SYNTAX
  535.  
  536.       Function PackDateString(DT:DateTime): String;
  537.  
  538.     EXAMPLES
  539.  
  540.       GetDateTime(DT);
  541.       Write(PackDateString(DT));
  542.  
  543.     Opus System file interface  Version 1.02                     Nov 23, 1988
  544.  
  545.  
  546.     UnpackDateString Procedure
  547.  
  548.     DESCRIPTION
  549.  
  550.         This Procedure will return the contents of a Date/time string in DT.
  551.       The format of the Date/Time string Must be:
  552.          'dd-mon-yy hh:mm:ss'
  553.             Ex. '24-May-88 12:22:21'  or  ' 4-Jul-88  0:12:34'
  554.  
  555.     SYNTAX
  556.  
  557.       Procedure UnpackDateString(S:String;Var DT:DateTime);
  558.  
  559.     EXAMPLES
  560.  
  561.       VAR
  562.         S: String[18];
  563.       BEGIN
  564.         Write('Enter Date & Time <dd-mon-yy hh:mm:ss>');
  565.         Readln(s);
  566.         UnpackDateString(s,DT);
  567.         ....
  568.  
  569.     Opus System file interface  Version 1.02                     Nov 23, 1988
  570.  
  571.  
  572.     PackDateStrLog Function
  573.  
  574.     DESCRIPTION
  575.  
  576.         Make a string containing Date and Time in LOG format.
  577.  
  578.     SYNTAX
  579.  
  580.       Function PackDateStrLog(DT:DateTime): String;
  581.  
  582.     Opus System file interface  Version 1.02                     Nov 23, 1988
  583.  
  584.  
  585.     AddLog Procedure
  586.  
  587.     DESCRIPTION
  588.  
  589.         Add a string to an OPUS log file using the correct format.
  590.  
  591.     SYNTAX
  592.  
  593.       Procedure AddLog(name:STRING; Flag: _StrSys; Subject: STRING);
  594.  
  595.     EXAMPLE
  596.  
  597.       AddLog('D:\Opus\Opus.Log','!','OPINT Here we go!');
  598.  
  599.     Opus System file interface  Version 1.02                     Nov 23, 1988
  600.  
  601.  
  602.     SetAttrib Procedure
  603.  
  604.     DESCRIPTION
  605.  
  606.         This Procedure will change the attribute flag for an attribute
  607.  
  608.         WARNING: 'Attribute' MUST be of type 'Word' or of Type 'Integer'..
  609.       Any other types are at Your own risk..
  610.  
  611.     SYNTAX
  612.  
  613.       Procedure SetAttrib(Var Attribute: Word; Flag: Word; Status:Boolean);
  614.         or
  615.       Procedure SetAttrib(Var Attribute: Integer; Flag: Word; Status:Boolean);
  616.  
  617.     EXAMPLES
  618.  
  619.       Var
  620.         MsgHead: _MsgHead;
  621.         Usr: _Usr;
  622.  
  623.       BEGIN
  624.         ....
  625.         SetAttrib(MsgHead._Attr,MsgHold,_On);
  626.         SetAttrib(MsgHead._Attr,MsgCrash,_Off);
  627.         SetAttrib(Usr.Flags,Usr_Ansi,_On);
  628.         ....
  629.  
  630.     Opus System file interface  Version 1.02                     Nov 23, 1988
  631.  
  632.  
  633.     ReadPrm Procedure
  634.  
  635.     DESCRIPTION
  636.  
  637.         ReadPrm reads the PRM file 'name' to a Variable of the type '_Prm'.
  638.  
  639.     SYNTAX
  640.  
  641.       Procedure ReadPrm(name:String; VAR Prm:_Prm);
  642.  
  643.     ERROR RETURNS
  644.  
  645.             0 = Everything is Bright and Sunny, Just go on
  646.             2 = File not found, Check your filename
  647.             3 = Path not found, Check your pathname
  648.             4 = Too many open files, We need one extra file.
  649.             5 = Fileaccess denied, Check file status.
  650.             12 = Invalid file acces code.
  651.             100 = Disk read error.
  652.             200 = .PRM file is to big ( > 8 KB )
  653.             201 = Wrong CTL file version, You need another OPUS_CTL
  654.  
  655.     EXAMPLES
  656.  
  657.       Var Prm:_Prm;
  658.       BEGIN
  659.         ReadPrm('D:\Opus\Opus.Prm',Prm);
  660.         IF opIntError > 0 THEN
  661.         ....
  662.  
  663.     Opus System file interface  Version 1.02                     Nov 23, 1988
  664.  
  665.  
  666.     WritePrm Procedure
  667.  
  668.     DESCRIPTION
  669.  
  670.         Write a Parameter file for OPUS <tm>
  671.       This procedure will change the opInt Error flag.
  672.  
  673.     SYNTAX
  674.  
  675.       Procedure WritePrm(name:String; VAR Prm:_Prm);
  676.  
  677.     ERROR RETURNS
  678.  
  679.             0 = Everything is Bright and Sunny, Just go on
  680.             2 = File not found, Check your filename
  681.             3 = Path not found, Check your pathname
  682.             4 = Too many open files, We need one extra file.
  683.             5 = Fileaccess denied, Check file status.
  684.             12 = Invalid file acces code.
  685.             100 = Disk read error.
  686.             101 = Disk write error.
  687.             201 = Wrong CTL file version, You need another OPUS_CTL
  688.             202 = To much data for the .PRM file ( > 8 KB )
  689.  
  690.     EXAMPLES
  691.  
  692.       Var Prm: _Prm;
  693.       .....
  694.         WritePrm('Opus.Prm',Prm);
  695.         IF OpIntError > 0 THEN
  696.           .....
  697.  
  698.     Opus System file interface  Version 1.02                     Nov 23, 1988
  699.  
  700.  
  701.     ReadScheds Procedure
  702.  
  703.     DESCRIPTION
  704.  
  705.         ReadScheds reads a SCHEDULE file to a Vaiable of the type '_Scheds'
  706.  
  707.     SYNTAX
  708.  
  709.       Procedure ReadScheds(name:String; VAR Scheds:_Scheds);
  710.  
  711.     ERROR RETURNS
  712.  
  713.             0 = Everything is Bright and Sunny, Just go on
  714.             2 = File not found, Check your filename
  715.             3 = Path not found, Check your pathname
  716.             4 = Too many open files, We need one extra file.
  717.             5 = Fileaccess denied, Check file status.
  718.             12 = Invalid file acces code.
  719.             100 = Disk read error.
  720.  
  721.     EXAMPLES
  722.  
  723.       Var Scheds: _Scheds;
  724.       BEGIN
  725.         ReadScheds('Scheds.BBS',Scheds);
  726.         IF opIntError > 0 THEN
  727.         ....
  728.  
  729.     Opus System file interface  Version 1.02                     Nov 23, 1988
  730.  
  731.  
  732.     WriteScheds Procedure
  733.  
  734.     DESCRIPTION
  735.  
  736.         WriteScheds Writes a SCHEDULE file with the contents of a Vaiable
  737.       of the type '_Scheds'
  738.  
  739.     SYNTAX
  740.  
  741.       Procedure WriteScheds(name:String; VAR Scheds:_Scheds);
  742.  
  743.     EXAMPLES
  744.  
  745.       Var Scheds: _Scheds;
  746.       .....
  747.         WriteScheds('Scheds.BBS',Scheds);
  748.         IF OpIntError > 0 THEN
  749.           .....
  750.  
  751.     Opus System file interface  Version 1.02                     Nov 23, 1988
  752.  
  753.  
  754.     ReadSys Procedure
  755.  
  756.     DESCRIPTION
  757.  
  758.         ReadSys reads a SYSTEM??.BBS file into a Vaiable of the type '_Sys'.
  759.  
  760.     SYNTAX
  761.  
  762.       Procedure ReadSys(name:String; VAR Sys:_Sys);
  763.  
  764.     ERROR RETURNS
  765.  
  766.             0 = Everything is Bright and Sunny, Just go on
  767.             2 = File not found, Check your filename
  768.             3 = Path not found, Check your pathname
  769.             4 = Too many open files, We need one extra file.
  770.             5 = Fileaccess denied, Check file status.
  771.             12 = Invalid file acces code.
  772.             100 = Disk read error.
  773.  
  774.     EXAMPLES
  775.  
  776.       Var Sys:_Sys;
  777.       BEGIN
  778.         ReadSys('System23.BBS',Sys);
  779.         IF opIntError > 0 THEN
  780.         ....
  781.  
  782.     Opus System file interface  Version 1.02                     Nov 23, 1988
  783.  
  784.  
  785.     WriteSys Procedure
  786.  
  787.     DESCRITION
  788.  
  789.         WriteSys writes a SYSTEM??.BBS file with the contents of a  Vaiable
  790.       of the type '_Sys'.
  791.  
  792.     SYNTAX
  793.  
  794.       Procedure WriteSys(name:String; VAR Sys:_Sys);
  795.  
  796.     ERROR RETURNS
  797.  
  798.             0 = Everything is Bright and Sunny, Just go on
  799.             2 = File not found, Check your filename
  800.             3 = Path not found, Check your pathname
  801.             4 = Too many open files, We need one extra file.
  802.             5 = Fileaccess denied, Check file status.
  803.             12 = Invalid file acces code.
  804.             100 = Disk read error.
  805.             101 = Disk write error.
  806.  
  807.     EXAMPLES
  808.  
  809.       Var Sys: _Sys;
  810.       .....
  811.         WriteSys('System2.bbs',Sys);
  812.         IF OpIntError > 0 THEN
  813.           .....
  814.  
  815.     Opus System file interface  Version 1.02                     Nov 23, 1988
  816.  
  817.  
  818.     ReadUser Procedure
  819.  
  820.     DESCRIPTION
  821.  
  822.         This procedure will read a user record from a user file to a variable
  823.       of the structure _Usr, it will return the user record number 'rec'
  824.  
  825.     SYNTAX
  826.  
  827.       Procedure ReadUser(name:String; VAR Usr:_Usr;Rec: WORD);
  828.  
  829.     ERROR RETURNS
  830.  
  831.             0 = Everything is Bright and Sunny, Just go on
  832.             2 = File not found, Check your filename
  833.             3 = Path not found, Check your pathname
  834.             4 = Too many open files, We need one extra file.
  835.             5 = Fileaccess denied, Check file status.
  836.             12 = Invalid file acces code.
  837.             100 = Disk read error.
  838.             220 = Cannot find User record
  839.  
  840.     EXAMPLES
  841.  
  842.       Var Usr, Usr2: _Usr;
  843.           RecordNumber: Word;
  844.       BEGIN
  845.         ReacordNumber:=1;
  846.         ReadUser('D:\Opus\User.BBS',Usr,RecordNumber);
  847.         IF opIntError > 0 THEN
  848.         ....
  849.         ReadUser('LastUser.BBS',Usr2,1);
  850.  
  851.     Opus System file interface  Version 1.02                     Nov 23, 1988
  852.  
  853.  
  854.     WriteUser Procedure
  855.  
  856.     DESCRIPTION
  857.  
  858.         This procedure will write a specified user record of the structure
  859.       '_Usr' to a user file, or it may add a record to the end of the user
  860.       file.
  861.  
  862.     SYNTAX
  863.  
  864.       Procedure WriteUser(name:String; VAR Usr:_Usr;Rec: WORD);
  865.  
  866.     ERROR RETURNS
  867.  
  868.             0 = Everything is Bright and Sunny, Just go on
  869.             2 = File not found, Check your filename
  870.             3 = Path not found, Check your pathname
  871.             4 = Too many open files, We need one extra file.
  872.             5 = Fileaccess denied, Check file status.
  873.             12 = Invalid file acces code.
  874.             100 = Disk read error.
  875.             101 = Disk write error.
  876.             220 = Cannot find User record
  877.  
  878.     EXAMPLES
  879.  
  880.       Var Usr: _Usr;
  881.       .....
  882.         WriteUsr('Uses.BBS',Usr,23);
  883.         IF OpIntError > 0 THEN
  884.           .....
  885.  
  886.     Opus System file interface  Version 1.02                     Nov 23, 1988
  887.  
  888.  
  889.     NumberOfUsers Function
  890.  
  891.     DESCRIPTION
  892.  
  893.         Will return the number of users in a userfile.
  894.  
  895.     SYNTAX
  896.  
  897.       Function NumberOfUsers(Name:String):Word;
  898.  
  899.     ERROR RETURNS
  900.  
  901.             0 = Everything is Bright and Sunny, Just go on
  902.             2 = File not found, Check your filename
  903.             3 = Path not found, Check your pathname
  904.             4 = Too many open files, We need one extra file.
  905.             5 = Fileaccess denied, Check file status.
  906.             12 = Invalid file acces code.
  907.             100 = Disk read error.
  908.  
  909.     EXAMPLES
  910.  
  911.       Write('Number of Users on My BBS : ',NumberOfUsers('User.BBS');
  912.  
  913.     Opus System file interface  Version 1.02                     Nov 23, 1988
  914.  
  915.  
  916.     InitUserPtr Procedure
  917.  
  918.     DESCRIPTION
  919.  
  920.         Initialise the UsrPointer.. Must be called if you create a new userfile
  921.  
  922.     SYNTAX
  923.  
  924.       Procedure InitUserPtr(VAR UsrPtr:_UsrPtr);
  925.  
  926.     EXAMPLES
  927.  
  928.       Var UsrPtr: _UsrPtr;
  929.       BEGIN
  930.         InitUserPtr(UsrPtr);
  931.         ....
  932.  
  933.     Opus System file interface  Version 1.02                     Nov 23, 1988
  934.  
  935.  
  936.     ReadUserFast Procedure
  937.  
  938.     DESCRIPTION
  939.  
  940.         This procedure will read all the user records from a variable of the
  941.       memory structure '_UsrPtr'.
  942.  
  943.     SYNTAX
  944.  
  945.       Procedure ReadUserFast(VAR UsrPtr:_UsrPtr; VAR Usr:_Usr; Recs: INTEGER);
  946.  
  947.     ERROR RETURNS
  948.  
  949.             220 = Cannot find User record
  950.  
  951.     EXAMPLES
  952.  
  953.       Var Usr: _Usr;
  954.           UsrPtr: _UsrPtr;
  955.       BEGIN
  956.         ReadUserFast(UsrPtr,Usr,1);
  957.         IF opIntError > 0 THEN
  958.         ....
  959.  
  960.     Opus System file interface  Version 1.02                     Nov 23, 1988
  961.  
  962.  
  963.     WriteUserFast
  964.  
  965.     DESCRIPTION
  966.  
  967.         This procedure will write one of the user records into menory
  968.  
  969.     SYNTAX
  970.  
  971.       Procedure WriteUserFast(VAR UsrPtr:_UsrPtr;VAR Usr:_Usr; Recs: INTEGER);
  972.  
  973.     ERROR RETURNS
  974.  
  975.             220 = Cannot find User record
  976.  
  977.     EXAMPLES
  978.  
  979.       Var Usr: _Usr;
  980.           UsrPtr: _UsrPtr;
  981.         ...
  982.         ReadUserFast(UsrPtr,Usr,1);
  983.         IF opIntError > 0 THEN
  984.         ....
  985.  
  986.     Opus System file interface  Version 1.02                     Nov 23, 1988
  987.  
  988.  
  989.     ReleaseUserPtr Procedure
  990.  
  991.     DESCRIPTION
  992.  
  993.         Release the Heap space used by the UsrPointer.
  994.  
  995.     SYNTAX
  996.  
  997.       Procedure ReleaseUserPtr(VAR UsrPtr:_UsrPtr);
  998.  
  999.  
  1000.  
  1001.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1002.  
  1003.  
  1004.     DelUserPtr
  1005.  
  1006.     DESCRIPTION
  1007.  
  1008.         Delete single user record from the User structure in Ram, and release
  1009.       the heap space too.
  1010.  
  1011.     SYNTAX
  1012.  
  1013.       Procedure DelUserPtr(VAR UsrPtr:_UsrPtr; Rec:Integer);
  1014.  
  1015.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1016.  
  1017.  
  1018.     InsUserPtr Procedure
  1019.  
  1020.     DESCRIPTION
  1021.  
  1022.         Insert new user record in the user structure in Ram.
  1023.  
  1024.     SYNTAX
  1025.  
  1026.       Procedure InsUserPtr(VAR UsrPtr:_UsrPtr; VAR Usr:_Usr; Rec:Integer);
  1027.  
  1028.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1029.  
  1030.  
  1031.     ReadUserFile Procedure
  1032.  
  1033.     DESCRIPTION
  1034.  
  1035.         This procedure will read all user records from a user file into a _UsrPtr
  1036.       structure in the menory.
  1037.  
  1038.     SYNTAX
  1039.  
  1040.       Procedure ReadUserFile(name:String; VAR UsrPtr:_UsrPtr; VAR Recs: INTEGER);
  1041.  
  1042.     ERROR RETURNS
  1043.  
  1044.             0 = Everything is Bright and Sunny, Just go on
  1045.             2 = File not found, Check your filename
  1046.             3 = Path not found, Check your pathname
  1047.             4 = Too many open files, We need one extra file.
  1048.             5 = Fileaccess denied, Check file status.
  1049.             12 = Invalid file acces code.
  1050.             100 = Disk read error.
  1051.             221 = To Many Records In UserFile, Cannot handle it.
  1052.  
  1053.       Var UsrPtr: _usrPtr;
  1054.           Recs: Integer;
  1055.       BEGIN
  1056.         ReadUserFile('D:\Opus\User.BBS',UsrPtr,Recs);
  1057.         IF opIntError > 0 THEN
  1058.         ....
  1059.  
  1060.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1061.  
  1062.  
  1063.     WriteUserFile Procedure
  1064.  
  1065.     DESCRIPTION
  1066.  
  1067.         This procedure will write all the user records menory structure
  1068.       _UsrPtr to a disk file.
  1069.  
  1070.     SYNTAX
  1071.  
  1072.       Procedure WriteUserFile(name:String; VAR UsrPtr:_UsrPtr);
  1073.  
  1074.     ERROR RETURNS
  1075.  
  1076.             0 = Everything is Bright and Sunny, Just go on
  1077.             2 = File not found, Check your filename
  1078.             3 = Path not found, Check your pathname
  1079.             4 = Too many open files, We need one extra file.
  1080.             5 = Fileaccess denied, Check file status.
  1081.             12 = Invalid file acces code.
  1082.             100 = Disk read error.
  1083.             101 = Disk write error.
  1084.  
  1085.     EXAMPLES
  1086.  
  1087.       Var UsrPtr: _UsrPtr;
  1088.       BEGIN
  1089.         WriteUserFile('User.BBS',UsrPtr);
  1090.         IF OpIntError > 0 THEN
  1091.           .....
  1092.  
  1093.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1094.  
  1095.  
  1096.     ReadNode Procedure
  1097.  
  1098.     DESCRIPTION
  1099.  
  1100.         Read a Nodelist type 5 record to a variable of the structure _Node.
  1101.  
  1102.     SYNTAX
  1103.  
  1104.       Procedure ReadNode(name:String; VAR Node:_Node;Rec: LongInt);
  1105.  
  1106.     ERROR RETURNS
  1107.  
  1108.             0 = Everything is Bright and Sunny, Just go on
  1109.             2 = File not found, Check your filename
  1110.             3 = Path not found, Check your pathname
  1111.             4 = Too many open files, We need one extra file.
  1112.             5 = Fileaccess denied, Check file status.
  1113.             12 = Invalid file acces code.
  1114.             100 = Disk read error.
  1115.             230 = Cannot find Nodelist Record
  1116.  
  1117.     EXAMPLES
  1118.  
  1119.       Var Node: _Node;
  1120.       BEGIN
  1121.         ReadNode('c:\Nodes\Nodelist.Sys',Node,13);
  1122.         IF opIntError > 0 THEN
  1123.         ....
  1124.  
  1125.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1126.  
  1127.  
  1128.     WriteNode Procedure
  1129.  
  1130.     DESCRIPTION
  1131.  
  1132.         This procedure will write a node record to a version 5 nodelist file.
  1133.  
  1134.     SYNTAX
  1135.  
  1136.       Procedure WriteNode(name:String; VAR Node:_Node;Rec: LongInt);
  1137.  
  1138.     ERROR RETURNS
  1139.  
  1140.             0 = Everything is Bright and Sunny, Just go on
  1141.             2 = File not found, Check your filename
  1142.             3 = Path not found, Check your pathname
  1143.             4 = Too many open files, We need one extra file.
  1144.             5 = Fileaccess denied, Check file status.
  1145.             12 = Invalid file acces code.
  1146.             100 = Disk read error.
  1147.             101 = Disk write error.
  1148.             230 = Cannot find Nodelist Record
  1149.  
  1150.     EXAMPLES
  1151.  
  1152.       Var Node: _Node;
  1153.       ....
  1154.         WriteNode('NODELIST.SYS',Node,12);
  1155.         IF OpIntError > 0 THEN
  1156.           .....
  1157.  
  1158.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1159.  
  1160.  
  1161.     ReadNewNode Procedure
  1162.  
  1163.     DESCRIPTION
  1164.  
  1165.         Read a Nodelist Type 6 record to a variable of the structure _NewNode.
  1166.  
  1167.     SYNTAX
  1168.  
  1169.       Procedure ReadNewNode(name:String; VAR NewNode:_NewNode;Rec: LongInt);
  1170.  
  1171.     ERROR RETURNS
  1172.  
  1173.             0 = Everything is Bright and Sunny, Just go on
  1174.             2 = File not found, Check your filename
  1175.             3 = Path not found, Check your pathname
  1176.             4 = Too many open files, We need one extra file.
  1177.             5 = Fileaccess denied, Check file status.
  1178.             12 = Invalid file acces code.
  1179.             100 = Disk read error.
  1180.             230 = Cannot find Nodelist Record
  1181.  
  1182.     EXAMPLES
  1183.  
  1184.       Var NewNode: _NewNode;
  1185.       BEGIN
  1186.         ReadNewNode('c:\Nodes\Nodelist.Sys',NewNode,13);
  1187.         IF opIntError > 0 THEN
  1188.         ....
  1189.  
  1190.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1191.  
  1192.  
  1193.     WriteNewNode Procedure
  1194.  
  1195.     DESCRIPTION
  1196.  
  1197.         This procedure will write a node record to a version 6 nodelist file.
  1198.  
  1199.     SYNTAX
  1200.  
  1201.       Procedure WriteNewNode(name:String; VAR Node:_NewNode;Rec: LongInt);
  1202.  
  1203.     ERROR RETURNS
  1204.  
  1205.             0 = Everything is Bright and Sunny, Just go on
  1206.             2 = File not found, Check your filename
  1207.             3 = Path not found, Check your pathname
  1208.             4 = Too many open files, We need one extra file.
  1209.             5 = Fileaccess denied, Check file status.
  1210.             12 = Invalid file acces code.
  1211.             100 = Disk read error.
  1212.             101 = Disk write error.
  1213.             230 = Cannot find Nodelist Record
  1214.  
  1215.     EXAMPLES
  1216.  
  1217.       Var NewNode: _NewNode;
  1218.       ....
  1219.         WriteNewNode('NODELIST.SYS',NewNode,12);
  1220.         IF OpIntError > 0 THEN
  1221.           .....
  1222.  
  1223.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1224.  
  1225.  
  1226.     NumberOfNodes Function
  1227.  
  1228.     DESCRIPTION
  1229.  
  1230.         Will return the number of nodes in a nodelistfile.
  1231.  
  1232.     SYNTAX
  1233.  
  1234.       Function NumberOfNodes(Name:String):LongInt;
  1235.  
  1236.     ERROR RETURNS
  1237.  
  1238.             0 = Everything is Bright and Sunny, Just go on
  1239.             2 = File not found, Check your filename
  1240.             3 = Path not found, Check your pathname
  1241.             4 = Too many open files, We need one extra file.
  1242.             5 = Fileaccess denied, Check file status.
  1243.             12 = Invalid file acces code.
  1244.             100 = Disk read error.
  1245.  
  1246.     EXAMPLES
  1247.  
  1248.       Write('Number of Nodes : ',NumberOfNodes('Nodelist.IDX');
  1249.  
  1250.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1251.  
  1252.  
  1253.     FindNode Function
  1254.  
  1255.     DESCRIPTION
  1256.  
  1257.         This function will return the record number in the nodelist for the
  1258.       selected node.
  1259.  
  1260.     SYNTAX
  1261.  
  1262.       Function FindNode(name:String;Net,Node: Integer):LongInt;
  1263.  
  1264.     ERROR RETURNS
  1265.  
  1266.             0 = Everything is Bright and Sunny, Just go on
  1267.             2 = File not found, Check your filename
  1268.             3 = Path not found, Check your pathname
  1269.             4 = Too many open files, We need one extra file.
  1270.             5 = Fileaccess denied, Check file status.
  1271.             12 = Invalid file acces code.
  1272.             100 = Disk read error.
  1273.  
  1274.     EXAMPLES
  1275.  
  1276.       Var
  1277.         Rec: Longint;
  1278.         Net,Node: Integer;
  1279.  
  1280.       BEGIN
  1281.         Net:=230;
  1282.         Node:=22;
  1283.         Rec:=FindNode('c:\Nodes\Nodelist.Idx',Net,Node);
  1284.         IF opIntError > 0 THEN
  1285.         ....
  1286.  
  1287.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1288.  
  1289.  
  1290.     ReadNdi Procedure
  1291.  
  1292.     DESCRIPTION
  1293.  
  1294.         This procedure will read a Ndi record from nodelist index file to a
  1295.       variable of the structure _Ndi.
  1296.  
  1297.     SYNTAX
  1298.  
  1299.       Procedure ReadNdi(name:String; VAR Ndi:_Ndi;Rec: LongInt);
  1300.  
  1301.     ERROR RETURNS
  1302.  
  1303.             0 = Everything is Bright and Sunny, Just go on
  1304.             2 = File not found, Check your filename
  1305.             3 = Path not found, Check your pathname
  1306.             4 = Too many open files, We need one extra file.
  1307.             5 = Fileaccess denied, Check file status.
  1308.             12 = Invalid file acces code.
  1309.             100 = Disk read error.
  1310.             231 = Cannot find Nodelist Index Record
  1311.  
  1312.     EXAMPLES
  1313.  
  1314.       Var Ndi: _Ndi;
  1315.       BEGIN
  1316.         ReadNdi('D:\Opus\Nodelist.Idx',Ndi,5432);
  1317.         IF opIntError > 0 THEN
  1318.         ....
  1319.  
  1320.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1321.  
  1322.  
  1323.     WriteNdi Procedure
  1324.  
  1325.     DESCRIPTION
  1326.  
  1327.         This procedure will write a Node list index record of the structure
  1328.       _Ndi to a nodelist index file
  1329.  
  1330.     SYNTAX
  1331.  
  1332.       Procedure WriteNdi(name:String; VAR Node:_Node;Rec: LongInt);
  1333.  
  1334.     ERROR RETURNS
  1335.  
  1336.             0 = Everything is Bright and Sunny, Just go on
  1337.             2 = File not found, Check your filename
  1338.             3 = Path not found, Check your pathname
  1339.             4 = Too many open files, We need one extra file.
  1340.             5 = Fileaccess denied, Check file status.
  1341.             12 = Invalid file acces code.
  1342.             100 = Disk read error.
  1343.             101 = Disk write error.
  1344.             231 = Cannot find Nodelist Index Record
  1345.  
  1346.     EXAMPLES
  1347.  
  1348.       Var Ndi: _Ndi;
  1349.       .....
  1350.         WriteNdi('Nodelist.Idx',Ndi,123456);
  1351.         IF OpIntError > 0 THEN
  1352.           .....
  1353.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1354.  
  1355.  
  1356.     MsgLength Function
  1357.  
  1358.     DESCRIPTION
  1359.  
  1360.         This function will return the number of charecters in a variable of the
  1361.       structure _Msg.
  1362.  
  1363.     SYNTAX
  1364.  
  1365.       Function MsgLength(VAR Msg:_Msg):LongInt;
  1366.  
  1367.     EXAMPLES
  1368.  
  1369.       .....
  1370.       IF MsgLength(Msg) > 1000 THEN
  1371.         Write('This is an expensive message, hope it's good too !!');
  1372.  
  1373.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1374.  
  1375.  
  1376.     ReadMsg Procedure
  1377.  
  1378.     DESCRIPTION
  1379.  
  1380.         This Procedure will read a message from disk into a variable of the
  1381.       structure _Msg, the length of a message is limited to 8191 charecters,
  1382.       or 300 lines (whatever you migth reach first).
  1383.       This procedure will read both the message header and the message body.
  1384.  
  1385.     SYNTAX
  1386.  
  1387.       Procedure ReadMsg(name:String; VAR Msg:_Msg);
  1388.  
  1389.     ERROR RETURNS
  1390.  
  1391.             0 = Everything is Bright and Sunny, Just go on
  1392.             2 = File not found, Check your filename
  1393.             3 = Path not found, Check your pathname
  1394.             4 = Too many open files, We need one extra file.
  1395.             5 = Fileaccess denied, Check file status.
  1396.             12 = Invalid file acces code.
  1397.             100 = Disk read error.
  1398.             210 = .MSG file is to big ( > 8 KB )
  1399.             211 = To many lines in message
  1400.  
  1401.     EXAMPLES
  1402.  
  1403.       Var Msg: _Msg;
  1404.       BEGIN
  1405.         ReadMsg('D:\Mail\Asgaard\12.Msg',Prm);
  1406.         IF opIntError > 0 THEN
  1407.         ....
  1408.  
  1409.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1410.  
  1411.  
  1412.     WriteMsg Procedure
  1413.  
  1414.     DESCRIPTION
  1415.  
  1416.         This procedure will write the contents of a variable of the structure
  1417.       Msg to a specified disk file.
  1418.  
  1419.     SYNTAX
  1420.  
  1421.       Procedure WriteMsg(name:String; VAR Msg:_Msg);
  1422.  
  1423.     ERROR RETURNS
  1424.  
  1425.             0 = Everything is Bright and Sunny, Just go on
  1426.             2 = File not found, Check your filename
  1427.             3 = Path not found, Check your pathname
  1428.             4 = Too many open files, We need one extra file.
  1429.             5 = Fileaccess denied, Check file status.
  1430.             12 = Invalid file acces code.
  1431.             100 = Disk read error.
  1432.             101 = Disk write error.
  1433.             212 = To many charecters to write message
  1434.     EXAMPLES
  1435.  
  1436.       Var Msg: _Msg;
  1437.       .....
  1438.         WriteMsg('D:\Mail\Agaard\23.MSG',Prm);
  1439.         IF OpIntError > 0 THEN
  1440.           .....
  1441.  
  1442.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1443.  
  1444.     ReadMsgHead Procedure
  1445.  
  1446.     DESCRIPTION
  1447.  
  1448.         This procedure will read the message header from a message file. The
  1449.       header will be read to a variable of the structure _Msg.
  1450.       This procedure won't read the message body, so the read message will not
  1451.       contain any lines.
  1452.  
  1453.     SYNTAX
  1454.  
  1455.       Procedure ReadMsgHead(name:String; VAR Msg:_Msg);
  1456.  
  1457.     ERROR RETURNS
  1458.  
  1459.             0 = Everything is Bright and Sunny, Just go on
  1460.             2 = File not found, Check your filename
  1461.             3 = Path not found, Check your pathname
  1462.             4 = Too many open files, We need one extra file.
  1463.             5 = Fileaccess denied, Check file status.
  1464.             12 = Invalid file acces code.
  1465.             100 = Disk read error.
  1466.             210 = .MSG file is to big ( > 8 KB )
  1467.  
  1468.     EXAMPLES
  1469.  
  1470.       Var Msg: _Msg;
  1471.       BEGIN
  1472.         ReadMsgHead('D:\Mail\Asgaard\1.msg',Msg);
  1473.         IF opIntError > 0 THEN
  1474.         ....
  1475.  
  1476.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1477.  
  1478.  
  1479.     WriteMsgHead Procedure
  1480.  
  1481.     DESCRIPTION
  1482.  
  1483.         This procedure will rewite a the header of a message with the contents
  1484.       of the structure _Msg.
  1485.  
  1486.         Note: This procedure won't create a new message but return an error.
  1487.  
  1488.     SYNTAX
  1489.  
  1490.       Procedure WriteMsgHead(name:String; VAR Msg:_Msg);
  1491.  
  1492.     ERROR RETURNS
  1493.  
  1494.             0 = Everything is Bright and Sunny, Just go on
  1495.             2 = File not found, Check your filename
  1496.             3 = Path not found, Check your pathname
  1497.             4 = Too many open files, We need one extra file.
  1498.             5 = Fileaccess denied, Check file status.
  1499.             12 = Invalid file acces code.
  1500.             100 = Disk read error.
  1501.             101 = Disk write error.
  1502.  
  1503.     EXAMPLES
  1504.  
  1505.       Var Msg: _Msg;
  1506.       .....
  1507.         WriteMsgHead('D:\mail\asgaard\1.msg',Msg);
  1508.         IF OpIntError > 0 THEN
  1509.           .....
  1510.  
  1511.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1512.  
  1513.     ReadMsgHeadNew Procedure
  1514.  
  1515.     DESCRIPTION
  1516.  
  1517.         This procedure will read the message header from a message file. The
  1518.       header will be read to a variable of the structure _MsgHead.
  1519.  
  1520.     SYNTAX
  1521.  
  1522.       Procedure ReadMsgHeadNew(name:String; VAR MsgHead:_MsgHead);
  1523.  
  1524.     ERROR RETURNS
  1525.  
  1526.             0 = Everything is Bright and Sunny, Just go on
  1527.             2 = File not found, Check your filename
  1528.             3 = Path not found, Check your pathname
  1529.             4 = Too many open files, We need one extra file.
  1530.             5 = Fileaccess denied, Check file status.
  1531.             12 = Invalid file acces code.
  1532.             100 = Disk read error.
  1533.             210 = .MSG file is to big ( > 8 KB )
  1534.  
  1535.     EXAMPLES
  1536.  
  1537.       Var MsgHead: _MsgHead;
  1538.       BEGIN
  1539.         ReadMsgHeadNew('D:\Mail\Asgaard\1.msg',MsgHead);
  1540.         IF opIntError > 0 THEN
  1541.         ....
  1542.  
  1543.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1544.  
  1545.  
  1546.     WriteMsgHeadNew Procedure
  1547.  
  1548.     DESCRIPTION
  1549.  
  1550.         This procedure will rewite a the header of a message with the contents
  1551.       of the structure _MsgHead.
  1552.  
  1553.         Note: This procedure won't create a new message but return an error.
  1554.  
  1555.     SYNTAX
  1556.  
  1557.       Procedure WriteMsgHeadNew(name:String; VAR MsgHead:_MsgHead);
  1558.  
  1559.     ERROR RETURNS
  1560.  
  1561.             0 = Everything is Bright and Sunny, Just go on
  1562.             2 = File not found, Check your filename
  1563.             3 = Path not found, Check your pathname
  1564.             4 = Too many open files, We need one extra file.
  1565.             5 = Fileaccess denied, Check file status.
  1566.             12 = Invalid file acces code.
  1567.             100 = Disk read error.
  1568.             101 = Disk write error.
  1569.  
  1570.     EXAMPLES
  1571.  
  1572.       Var Msg: _Msg;
  1573.       .....
  1574.         WriteMsgHeadNew('D:\mail\asgaard\1.msg',MsgHead);
  1575.         IF OpIntError > 0 THEN
  1576.           .....
  1577.  
  1578.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1579.  
  1580.  
  1581.     FirstFreeMsg Function
  1582.  
  1583.     DESCRIPTION
  1584.  
  1585.         This Function will return the first free message number in the area
  1586.       described by a path.
  1587.         The path used when called will be placed in front of the filename.
  1588.         If no path is used the function will return the number for the current
  1589.       directory.
  1590.  
  1591.          Here is some examples: (lets say there is 98 messages in each area)
  1592.  
  1593.                 PATH                     FIRST FREE
  1594.  
  1595.             'd:\msg\test'     -->   'd:\msg\test\99.msg'
  1596.             'd:\msg\test\'    -->   'd:\msg\test\99.msg'
  1597.             'd:'              -->   'd:\99.msg'
  1598.             '.'               -->   '.\99.msg'
  1599.             '.\'              -->   '.\99.msg'
  1600.             '..\msg\test'     -->   '..\msg\test\99.msg'
  1601.             ''                -->   '99.msg'
  1602.  
  1603.     SYNTAX
  1604.  
  1605.       Function FirstFreeMsg(Path:String):String;
  1606.  
  1607.     ERROR RETURNS
  1608.  
  1609.             0 = Everything is Bright and Sunny, Just go on
  1610.             2 = File not found, Check your filename
  1611.             3 = Path not found, Check your pathname
  1612.             4 = Too many open files, We need one extra file.
  1613.             5 = Fileaccess denied, Check file status.
  1614.             12 = Invalid file acces code.
  1615.             100 = Disk read error.
  1616.  
  1617.     EXAMPLES
  1618.  
  1619.          ...
  1620.          S:=FirstFreeMsg('d:\msg\test\');
  1621.          WriteMsg(S,Msg);
  1622.          ...
  1623.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1624.  
  1625.  
  1626.     KeyPressed Function
  1627.  
  1628.     DESCRIPTION
  1629.  
  1630.         This function is true if there is a character available on the
  1631.       standard input device.
  1632.  
  1633.     SYNTAX
  1634.  
  1635.        Function KeyPressed: Boolean;
  1636.  
  1637.     EXAMPLES
  1638.  
  1639.       Program Test1;
  1640.  
  1641.         Uses OpInt;
  1642.  
  1643.         BEGIN
  1644.           IF KeyPressed THEN
  1645.             Write('SomeOne pressed a key');
  1646.         END;
  1647.  
  1648.       Program test2;
  1649.     
  1650.         Uses Crt,OpInt;          {Note the last listed will take precedence}
  1651.  
  1652.         BEGIN
  1653.           IF KeyPressed THEN     {The OpInt.KeyPressed function}
  1654.             Write('SomeOne pressed a key');
  1655.           IF Crt.KeyPressed THEN {Here is how to call Crt.KeyPressed}
  1656.             Write('SysOp pressed a key on the console');
  1657.         END.
  1658.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1659.  
  1660.  
  1661.     ReadKey Function
  1662.  
  1663.     DESCRIPTION
  1664.  
  1665.        This function will return a character from the standard input device.
  1666.  
  1667.     SYNTAX
  1668.  
  1669.       Function ReadKey: Char;
  1670.  
  1671.     ERROR RETURNS
  1672.  
  1673.       IOResult will be effected.
  1674.  
  1675.     EXAMPLES
  1676.  
  1677.       Program Test1;
  1678.  
  1679.         Uses OpInt;
  1680.  
  1681.         BEGIN
  1682.           Write(ReadKey);
  1683.         END;
  1684.  
  1685.       Program test2;
  1686.     
  1687.         Uses Crt,OpInt;          {Note the last listed will take precedence}
  1688.  
  1689.         BEGIN
  1690.           Writeln(ReadKey);      {Use ReadKey from OpInt}
  1691.           Writeln(OpInt.ReadKey);{This will do the same}
  1692.           Writeln(Crt.ReadKey);  {Here is how to call Crt.ReadKey}
  1693.         END.
  1694.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1695.  
  1696.  
  1697.     GotoXY Procedure
  1698.  
  1699.     DESCRIPTION
  1700.  
  1701.         This procedure will move the cursor at the standard output to the
  1702.       selected position. Please notice that this function uses the ANSI.SYS
  1703.       device driver. If the you are redirecting the StdOut to a com port the
  1704.       terminal emulator in the other end must be able to handle Ansi escape
  1705.       sequences.
  1706.  
  1707.     SYNTAX
  1708.  
  1709.       Procedure GotoXY(X,Y: Byte);
  1710.  
  1711.     ERROR RETURNS
  1712.  
  1713.     EXAMPLES
  1714.  
  1715.       BEGIN
  1716.         GotoXY(1,2);
  1717.         ....
  1718.       Program Test1;
  1719.  
  1720.         Uses OpInt;
  1721.  
  1722.         BEGIN
  1723.           GotoXY(1,2);           {Use ReadKey from OpInt}
  1724.         END;
  1725.  
  1726.       Program test2;
  1727.     
  1728.         Uses Crt,OpInt;          {Note the last listed will take precedence}
  1729.  
  1730.         BEGIN
  1731.           GotoXY(1,2);           {Use GotoXY from OpInt}
  1732.           Crt.GotoXY(1,2);       {Here is how to call Crt.ReadKey}
  1733.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1734.  
  1735.  
  1736.     PurgeInFossil Procedure
  1737.  
  1738.     DESCRIPTION
  1739.  
  1740.         This procedure will delete all charecters from the Com port input
  1741.       buffer. Before using this function the text file must be oppened with
  1742.       the AssignFossil procedure.
  1743.  
  1744.     SYNTAX
  1745.  
  1746.       Procedure PurgeInFossil(VAR F:TEXT);
  1747.  
  1748.     ERROR RETURNS
  1749.  
  1750.     EXAMPLES
  1751.  
  1752.       Var F:TEXT;
  1753.       BEGIN
  1754.         AssignFossil(F,0,0);
  1755.         PurgeInFossil(F);
  1756.         ....
  1757.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1758.  
  1759.  
  1760.     PurgeOutFossil Procedure
  1761.  
  1762.     DESCRIPTION
  1763.  
  1764.         This procedure will delete everything in the Fossil output buffer.
  1765.  
  1766.     SYNTAX
  1767.  
  1768.       Procedure PurgeOutFossil(VAR F:Text);
  1769.  
  1770.     ERROR RETURNS
  1771.  
  1772.     EXAMPLES
  1773.  
  1774.       Var F:TEXT;
  1775.       BEGIN
  1776.         AssignFossil(F,0,0);
  1777.         PurgeOutFossil(F);
  1778.         ....
  1779.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1780.  
  1781.  
  1782.     FossilCarrier Function
  1783.  
  1784.     DESCRIPTION
  1785.  
  1786.        This function will be true if there are carrier on the selected COM
  1787.      port.
  1788.  
  1789.     SYNTAX
  1790.  
  1791.       Function FossilCarrier(VAR F:TEXT): Boolean;
  1792.  
  1793.     ERROR RETURNS
  1794.  
  1795.     EXAMPLES
  1796.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1797.  
  1798.  
  1799.     FossilPressed Function
  1800.  
  1801.     DESCRIPTION
  1802.  
  1803.        This function will be true if there is a character available in the 
  1804.      input buffer for the selected COM device.
  1805.  
  1806.     SYNTAX
  1807.  
  1808.       Function FossilPressed(VAR F:TEXT): Boolean;
  1809.  
  1810.     ERROR RETURNS
  1811.  
  1812.     EXAMPLES
  1813.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1814.  
  1815.  
  1816.     GotoXYFossil Procedure
  1817.  
  1818.     DESCRIPTION
  1819.  
  1820.         This procedure will move the cursor at the selected device to the
  1821.       selected position. Please notice that this function uses ANSI control
  1822.       codes and the terminal emulator must be able to handle this.
  1823.  
  1824.     SYNTAX
  1825.  
  1826.       Procedure GotoXYFossil(VAR F: Text;X,Y: Byte);
  1827.  
  1828.     ERROR RETURNS
  1829.  
  1830.     EXAMPLES
  1831.  
  1832.         ....
  1833.         GotoXYFossil(Com1,1,2);
  1834.         ....
  1835.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1836.  
  1837.  
  1838.     ReadFossil Function
  1839.  
  1840.     DESCRIPTION
  1841.  
  1842.         This function will return a character from the port conected to the
  1843.       Text File Device.
  1844.  
  1845.     SYNTAX
  1846.  
  1847.       Function ReadFossil(VAR F:TEXT): Char;
  1848.  
  1849.     ERROR RETURNS
  1850.  
  1851.       IOResult will be effected.
  1852.  
  1853.     EXAMPLES
  1854.       
  1855.       VAR F: TEXT;
  1856.       BEGIN
  1857.         ...
  1858.         Write(ReadFossil(F));
  1859.         ....
  1860.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1861.  
  1862.  
  1863.     AssignFossil Procedure
  1864.  
  1865.     DESCRIPTION
  1866.  
  1867.         This procedure is used to make at text file device driver for a
  1868.       selected communications port, at a selected baud rate.
  1869.         When assigned the device will get the Default modes as set in the
  1870.       variables '_Snoop', '_Keyboard' and '_ExitCarrier'
  1871.  
  1872.     SYNTAX
  1873.  
  1874.       AssignFossil(VAR F:Text; Port,Baud: Word);
  1875.  
  1876.     ERROR RETURNS
  1877.  
  1878.     EXAMPLES
  1879.  
  1880.       VAR A,B: Text;
  1881.       BEGIN
  1882.         _Snoop:=_Off;          { Don't print to the screen                   }
  1883.         _Keyboard:=_Off;       { Don't read from the KeyBoard                }
  1884.         _ExitCarrier:=1;       { Exit if Carrier changes withh Errlevel 1    }
  1885.         AssignFossil(A,0,0);   { Assign 'A' to port 0, don't change baudrate }
  1886.         _Snoop:=_On;           { Let's have a look at this fellow            }
  1887.         AssignFossil(B,1,300); { Assign 'B' to port 1 at 1200 Baud           }
  1888.         ...
  1889.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1890.  
  1891.  
  1892.     SetSnoopFossil Procedure
  1893.  
  1894.     DESCRIPTION
  1895.  
  1896.       Change the Snoop mode for a Text file device driver.
  1897.  
  1898.     SYNTAX
  1899.  
  1900.       Procedure SetSnoopFossil(VAR F:Text, _Snoop: Boolean);
  1901.  
  1902.     EXAMPLES
  1903.  
  1904.       VAR ComIn: Text;
  1905.       ...
  1906.         SetSnoopFossil(ComIn,_On); { _On := True; _Off:=False }
  1907.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1908.  
  1909.  
  1910.     SetKeyboardFossil Procedure
  1911.  
  1912.     DESCRIPTION
  1913.  
  1914.         Change the Keyboard mode for a Text file device driver.
  1915.         Notice that if you enable the keyboard mode you will enable the Snoop
  1916.       mode too.
  1917.  
  1918.     SYNTAX
  1919.  
  1920.       Procedure SetKeyboardFossil(VAR F:Text, _Keyboard: Boolean);
  1921.  
  1922.     EXAMPLES
  1923.  
  1924.       VAR ComIn: Text;
  1925.       ...
  1926.         SetKeyboardFossil(ComIn,_On); { _On := True; _Off:=False }
  1927.  
  1928.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1929.  
  1930.  
  1931.     SetExitFossil Procedure
  1932.  
  1933.     DESCRIPTION
  1934.  
  1935.       Change the exit code for changed carrier, or disable this function.
  1936.  
  1937.     SYNTAX
  1938.  
  1939.       Procedure SetExitFossil(VAR F:Text, _Exit: Byte);
  1940.  
  1941.     EXAMPLES
  1942.  
  1943.       VAR ComIn: Text;
  1944.       ...
  1945.         SetSnoopFossil(ComIn,5); { 0 : Don't exit; >0 : Exit with this code}
  1946.  
  1947.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1948.  
  1949.  
  1950.     UseInOut Procedure
  1951.  
  1952.     DESCRIPTION
  1953.  
  1954.         This procedure will change the devices 'Input' and 'Output' to use
  1955.       the selected port at the selected speed. 
  1956.         The variables '_Snoop', '_Keyboard' and '_ExitCarrier' will set
  1957.       the default Snoop, keyboard and ExitOnCarrier modes..
  1958.         You may change these modes using the procedures 'SetSnoopFissil',
  1959.       'SetKeyboardFossil' and 'SetExitFossil' to change the modes, but
  1960.       must use these on both 'Input' and 'Output'. 
  1961.  
  1962.     SYNTAX
  1963.  
  1964.       Procedure UseInOut(Port, Baud: Word);
  1965.  
  1966.     ERROR RETURNS
  1967.  
  1968.     EXAMPLES
  1969.  
  1970.       BEGIN
  1971.         UseInOut(1,1200); { Assign for COM2 at 1200 baud }
  1972.         WriteLn('Hello out there, how are you');
  1973.         readln;  { Wait for someone to press enterr }
  1974.         ...
  1975.  
  1976.     Opus System file interface  Version 1.02                     Nov 23, 1988
  1977.  
  1978.  
  1979.     UnUseInOut Procedure
  1980.  
  1981.     DESCRIPTION
  1982.  
  1983.       UnInstall the text file device drivers for standard input and output.
  1984.  
  1985.     SYNTAX
  1986.  
  1987.       Procedure UnUseInOut;
  1988.  
  1989.     ERROR RETURNS
  1990.  
  1991.     EXAMPLES
  1992.  
  1993.       BEGIN
  1994.         UseInOut(1,1200); { Assign for COM2 at 1200 baud }
  1995.         WriteLn('Hello, how are you');
  1996.         readln;
  1997.         UnUseInOut;
  1998.         Writeln('This is just for the SysOp console');
  1999.         ...
  2000.  
  2001.